package ee.ts022.tuum.services.jms;

import javax.jms.ExceptionListener;
import javax.jms.JMSException;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

@Component
public class JmsExceptionListener implements ExceptionListener {
	
	private static final Logger logger = LoggerFactory.getLogger(JmsExceptionListener.class);

	@Override
	public void onException(JMSException exception) {
		logger.error(exception.getMessage());
		exception.printStackTrace();
	}

}
